$(document).ready(function(){
	//For each comment block
	
	$(".es-msgResponses").each(function(){
		if($(this).children('.es-responseMsg').size() < 3){
			$(this).find('.showHideToggle').hide();
		}else{
			$(this).find('.showHideToggle').show();
			var size = $(this).children('.es-responseMsg').size();
			$(this).children('.es-responseMsg').slice(0,size-2).hide();
			$(this).find('.showHideToggle').toggle(
				function(){
					$(this).parent().children('.es-responseMsg').show();
					$(this).children('.ReplyControl').html('hide older responses');
				},
				function(){
					$(this).parent().children('.es-responseMsg').slice(0,size-2).hide();
					$(this).children('.ReplyControl').html('show all responses');
				}
			);
		}		
	});
});